/**
 * Borra Perfil
 * <br/>
 * Marca como borrado
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSEvent} event the event that triggered the action
 * @private
 * @properties={typeid:24,uuid:"9DB61DA2-B9EA-4547-8B39-F545D50C4695"}
 */
function borrar(event) {
	
	foundset.deleteRecord(foundset.getSelectedRecord());
}

/**
 * Called before the form component is rendered.
 *
 * @param {JSRenderEvent} event the render event
 *
 * @private
 *
 * @properties={typeid:24,uuid:"12B6CBD2-B83B-4227-B190-DB6E058A68CD"}
 */
function onRender(event) {

	/** @type {JSRecord<db:/pigeon_board/adm_t900_perfiles>} */
	var record = event.getRecord();
	
	if (record && record.adm_t900_perfiles_to_adm_t900_usuarios.b_es_super_adm == 1) {
		event.getRenderable().fgcolor = 'red';
	} else if (record && record.adm_t900_perfiles_to_adm_t900_usuarios.b_es_adm == 1) {
		event.getRenderable().fgcolor = 'blue';
	}else{
		event.getRenderable().fgcolor = '#808080';
	}
}
